/**
 * Generate time : 2011-10-22 17:50:05
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.ch.domain;

import com.baosight.iplat4j.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCPProduceStatistics
 * 
 */
public class ZMCPProduceStatistics extends DaoEPBase {

	private String fdKeyId = " "; /* 主键 */
	private String fdProjectId = " "; /* 工程ID */
	private String fdDepartmentId = " "; /* 施工部门ID */
	private String fdDepartmentName = " "; /* 施工部门 */
	private String fdYear = " "; /* 年份 */
	private String fdMonth = " "; /* 月份 */
	private Double fdPlanSum = new Double(0); /* 计划量 */
	private Double fdReportSum = new Double(0); /* 上报量 */
	private Double fdValidateSum = new Double(0); /* 验收量 */
	private Double fdDispatchSum = new Double(0); /* 调度量 */
	private Double fdMeasureSum = new Double(0); /* 计量量 */

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("主键");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdProjectId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("工程ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdDepartmentId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("施工部门ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdDepartmentName");
		eiColumn.setFieldLength(100);
		eiColumn.setDescName("施工部门");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdYear");
		eiColumn.setFieldLength(4);
		eiColumn.setDescName("年份");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdMonth");
		eiColumn.setFieldLength(2);
		eiColumn.setDescName("月份");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdPlanSum");
		eiColumn.setType("N");
		eiColumn.setScaleLength(4);
		eiColumn.setFieldLength(18);
		eiColumn.setDescName("计划量");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdReportSum");
		eiColumn.setType("N");
		eiColumn.setScaleLength(4);
		eiColumn.setFieldLength(18);
		eiColumn.setDescName("上报量");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdValidateSum");
		eiColumn.setType("N");
		eiColumn.setScaleLength(4);
		eiColumn.setFieldLength(18);
		eiColumn.setDescName("验收量");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdDispatchSum");
		eiColumn.setType("N");
		eiColumn.setScaleLength(4);
		eiColumn.setFieldLength(18);
		eiColumn.setDescName("调度量");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdMeasureSum");
		eiColumn.setType("N");
		eiColumn.setScaleLength(4);
		eiColumn.setFieldLength(18);
		eiColumn.setDescName("计量量");
		eiMetadata.addMeta(eiColumn);

	}

	/**
	 * the constructor
	 */
	public ZMCPProduceStatistics() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - 主键
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - 主键
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdProjectId - 工程ID
	 * 
	 * @return the fdProjectId
	 */
	public String getFdProjectId() {
		return this.fdProjectId;
	}

	/**
	 * set the fdProjectId - 工程ID
	 */
	public void setFdProjectId(String fdProjectId) {
		this.fdProjectId = fdProjectId;
	}

	/**
	 * get the fdDepartmentId - 施工部门ID
	 * 
	 * @return the fdDepartmentId
	 */
	public String getFdDepartmentId() {
		return this.fdDepartmentId;
	}

	/**
	 * set the fdDepartmentId - 施工部门ID
	 */
	public void setFdDepartmentId(String fdDepartmentId) {
		this.fdDepartmentId = fdDepartmentId;
	}

	/**
	 * get the fdDepartmentName - 施工部门
	 * 
	 * @return the fdDepartmentName
	 */
	public String getFdDepartmentName() {
		return this.fdDepartmentName;
	}

	/**
	 * set the fdDepartmentName - 施工部门
	 */
	public void setFdDepartmentName(String fdDepartmentName) {
		this.fdDepartmentName = fdDepartmentName;
	}

	/**
	 * get the fdYear - 年份
	 * 
	 * @return the fdYear
	 */
	public String getFdYear() {
		return this.fdYear;
	}

	/**
	 * set the fdYear - 年份
	 */
	public void setFdYear(String fdYear) {
		this.fdYear = fdYear;
	}

	/**
	 * get the fdMonth - 月份
	 * 
	 * @return the fdMonth
	 */
	public String getFdMonth() {
		return this.fdMonth;
	}

	/**
	 * set the fdMonth - 月份
	 */
	public void setFdMonth(String fdMonth) {
		this.fdMonth = fdMonth;
	}

	/**
	 * get the fdPlanSum - 计划量
	 * 
	 * @return the fdPlanSum
	 */
	public Double getFdPlanSum() {
		return this.fdPlanSum;
	}

	/**
	 * set the fdPlanSum - 计划量
	 */
	public void setFdPlanSum(Double fdPlanSum) {
		this.fdPlanSum = fdPlanSum;
	}

	/**
	 * get the fdReportSum - 上报量
	 * 
	 * @return the fdReportSum
	 */
	public Double getFdReportSum() {
		return this.fdReportSum;
	}

	/**
	 * set the fdReportSum - 上报量
	 */
	public void setFdReportSum(Double fdReportSum) {
		this.fdReportSum = fdReportSum;
	}

	/**
	 * get the fdValidateSum - 验收量
	 * 
	 * @return the fdValidateSum
	 */
	public Double getFdValidateSum() {
		return this.fdValidateSum;
	}

	/**
	 * set the fdValidateSum - 验收量
	 */
	public void setFdValidateSum(Double fdValidateSum) {
		this.fdValidateSum = fdValidateSum;
	}

	/**
	 * get the fdDispatchSum - 调度量
	 * 
	 * @return the fdDispatchSum
	 */
	public Double getFdDispatchSum() {
		return this.fdDispatchSum;
	}

	/**
	 * set the fdDispatchSum - 调度量
	 */
	public void setFdDispatchSum(Double fdDispatchSum) {
		this.fdDispatchSum = fdDispatchSum;
	}

	/**
	 * get the fdMeasureSum - 计量量
	 * 
	 * @return the fdMeasureSum
	 */
	public Double getFdMeasureSum() {
		return this.fdMeasureSum;
	}

	/**
	 * set the fdMeasureSum - 计量量
	 */
	public void setFdMeasureSum(Double fdMeasureSum) {
		this.fdMeasureSum = fdMeasureSum;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdProjectId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdProjectId")), fdProjectId));
		setFdDepartmentId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdDepartmentId")), fdDepartmentId));
		setFdDepartmentName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdDepartmentName")), fdDepartmentName));
		setFdYear(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdYear")), fdYear));
		setFdMonth(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMonth")), fdMonth));
		setFdPlanSum(NumberUtils.toDouble(StringUtils.toString(map.get("fdPlanSum")), fdPlanSum));
		setFdReportSum(NumberUtils.toDouble(StringUtils.toString(map.get("fdReportSum")), fdReportSum));
		setFdValidateSum(NumberUtils.toDouble(StringUtils.toString(map.get("fdValidateSum")), fdValidateSum));
		setFdDispatchSum(NumberUtils.toDouble(StringUtils.toString(map.get("fdDispatchSum")), fdDispatchSum));
		setFdMeasureSum(NumberUtils.toDouble(StringUtils.toString(map.get("fdMeasureSum")), fdMeasureSum));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdProjectId", StringUtils.toString(fdProjectId, eiMetadata.getMeta("fdProjectId")));
		map.put("fdDepartmentId", StringUtils.toString(fdDepartmentId, eiMetadata.getMeta("fdDepartmentId")));
		map.put("fdDepartmentName", StringUtils.toString(fdDepartmentName, eiMetadata.getMeta("fdDepartmentName")));
		map.put("fdYear", StringUtils.toString(fdYear, eiMetadata.getMeta("fdYear")));
		map.put("fdMonth", StringUtils.toString(fdMonth, eiMetadata.getMeta("fdMonth")));
		map.put("fdPlanSum", StringUtils.toString(fdPlanSum, eiMetadata.getMeta("fdPlanSum")));
		map.put("fdReportSum", StringUtils.toString(fdReportSum, eiMetadata.getMeta("fdReportSum")));
		map.put("fdValidateSum", StringUtils.toString(fdValidateSum, eiMetadata.getMeta("fdValidateSum")));
		map.put("fdDispatchSum", StringUtils.toString(fdDispatchSum, eiMetadata.getMeta("fdDispatchSum")));
		map.put("fdMeasureSum", StringUtils.toString(fdMeasureSum, eiMetadata.getMeta("fdMeasureSum")));

		return map;

	}
}